-<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>真实合同管理</title>
<meta name="decorator" content="default" />
<script src="/jeesite/pro/realDetailForm/js/realDetailForm.js" type="text/javascript"></script>
<script src="/jeesite/pro/realDetailForm/js/choiceProInfo.js" type="text/javascript"></script>
<script src="/jeesite/pro/realDetailForm/js/choiceSupplier.js" type="text/javascript"></script>
<script type="text/javascript">
//清空产品编号
function emptyProductCodeNum(){
	 $("#productCodeNumModify").remove();
	 $("#productCodeNumModify").remove();
	 $("#productFlag").append("<input type='hidden' class='input-xlarge' id='productCodeNumModify'/>"); 
}
function emptySupplierCodeNum(){
	  $("#supplierCodeNumModify").remove();
	  $("#supplierCodeNumModify").remove();
	  $("#supplierFlag").append("<input type='hidden' class='input-xlarge' id='supplierCodeNumModify'/>"); 
	}
function emptyProductCodeNumAdd(){
	  $("#productCodeNum").remove();
	  $("#productCodeNum").remove();
	  $("#productFlagAdd").append("<input type='hidden' id='productCodeNum'/>"); 
	}
function emptySupplierCodeNumAdd(){
	  $("#supplierCodeNum").remove();
	  $("#supplierCodeNum").remove();
	  $("#supplierFlagAdd").append("<input type='hidden' id='supplierCodeNum'/>"); 
	}
</script>
</head>
<body class="fixed-top">

<div class="container" style="width: 100%;">
	<div style="margin: 20px; border: 1px solid #c8d1d5;">
		<div style="padding: 10px; background-color: #f4f4f4; border-bottom: 1px solid #c8d1d5;">
			<h4>
				<i class="icon-globe"></i>${not empty realContract.id?'修改':'添加'}客户合同
			</h4>
			<ul class="ul-form" style="float: right; margin-top: -25px;">
				<li style="list-style: none">${not empty realContract.id?'<a style="float: right;"  class="btn btn-info" href="javascript:void(0)" id="btnExport">
						<i class="icon-upload"></i>&nbsp;导出
					</a>':''}
					${not empty realContract.id?'<a class="btn btn-info" href="javascript:void(0)" id="btnImport">
						<i class="icon-upload"></i>&nbsp;导入
					</a>':''}&nbsp;
					${empty realContract.id?'<a class="btn btn-info" href="javascript:void(0)" id="btnImport">
						<i class="icon-upload"></i>&nbsp;导入
					</a>':''}&nbsp;
				</li>
			</ul>
		</div>
		<form action="${ctx}/pro/realDetail/save" method="post" id="saveForm">
		<div style="margin: 17px;">
			<div class="row-fluid" style="border: 1px solid #c8d1d5; padding-top: 10px; margin-bottom: 20px;">
				<div class="row-fluid ">
					<div class="span3" style="margin-left: 10px;">
						<label class="control-label"
							style="font-size: 14px; margin-bottom: 3px;">客户合同订单号</label>
						<div class="">
							<input type="text" id="code" name="code" value="${realContract.code}" class="span12" /> 
							<input value="${realContract.id }" name="id" id="realContractId" type="hidden" />
						</div>
					</div>
					<div class="span3">
						<label class="control-label"
							style="font-size: 14px; margin-bottom: 3px;">客户合同日期</label>
						<div>
							<input type="text" name="contractDate" id="contractDate" value="<fmt:formatDate value="${realContract.contractDate}" pattern="yyyy-MM-dd"/>"
								readonly="readonly" maxlength="40" class="span12 Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});" />
						</div>
					</div>
					<div class="span3">
						<label class="control-label"
							style="font-size: 14px; margin-bottom: 3px;">送货日期</label>
						<div>
							<input type="text" name="deliveryDate" 
								value="<fmt:formatDate value="${realContract.deliveryDate}" pattern="yyyy-MM-dd"/>"
								readonly="readonly" maxlength="40" class="span12 Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});" />
						</div>
					</div>
				</div>
				<div class="row-fluid ">
				<div class="span3" style="margin-left: 10px;">
						<label class="control-label"
							style="font-size: 14px; margin-bottom: 3px;">客户编号</label>
						<div class="">
							<input type="text" id="clienteleCodeNum" name="clienteleCodeNum"
								class="span12" ondblclick="choiceClientele()"
								placeholder="输入信息或双击选择" value="${realContract.clienteleCodeNum}" /> 
						</div>
					</div>
					<div class="span3">
						<label class="control-label"
							style="font-size: 14px; margin-bottom: 3px;">客户名称</label>
						<div class="">
							<input type="text" id="clienteleName" name="clienteleName"
								class="span12" 
								 value="${realContract.clienteleName}" /> 
						</div>
					</div>
					<div class="span3">
						<label class="control-label"
							style="font-size: 14px; margin-bottom: 3px;">联系电话</label>
						<div class="">
							<input type="text" id="phone" name="clientelePhone" class="span12"
								placeholder="" value="${realContract.clientelePhone}" />
						</div>
					</div>
					
				</div>
				<div class="row-fluid ">
				    <div class="span3" style="margin-left: 10px;">
						<label class="control-label"
							style="font-size: 14px; margin-bottom: 3px;">传真</label>
						<div class="">
							<input type="text" id="fax" name="clienteleFax" class="span12"
								placeholder="" value="${realContract.clienteleFax}" />
						</div>
					</div>
					<div class="span3" >
						<label class="control-label"
							style="font-size: 14px; margin-bottom: 3px;">邮箱</label>
						<div class="">
							<input type="text" id="email" name="clienteleEmail" class="span12"
								placeholder="" value="${realContract.clienteleEmail}" />
						</div>
					</div>
				</div>
			</div>
			<table id="contentTable" class="table table-hover table-bordered" style="word-wrap:break-all;word-break:break-all;">
				<thead>
					<tr class="widget-title">
						<c:forEach items="${columnList}" var="column">
							<c:choose>
								<c:when test="${column.className == 'productInfoName'}">
									<th style="white-space: normal;"><span id="productInfoNameSpan">产品名称</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'productInfoProductCode'}">
									<th style="white-space: normal;"><span id="productCodeSpan">产品代码</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when
									test="${column.className == 'productInfoSpecifications'}">
									<th style="white-space: normal;"><span id="specificationsSpan">规格</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'productInfoBrand'}">
									<th style="white-space: normal;"><span id="brandSpan">品牌</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'productInfoPackaging'}">
									<th style="white-space: normal;"><span id="packagingSpan">封装</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'unitName'}">
									<th style="white-space: normal;"><span id="unitNameSpan">单位</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'supplierName'}">
									<th style="white-space: normal;"><span id="supplierNameSpan">供应商</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'noTaxPrice'}">
									<th style="white-space: normal;"><span id="noTaxPriceSpan">未税价格</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'taxPrice'}">
									<th style="white-space: normal;"><span id="taxPriceSpan">含税价格</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'marketPrice'}">
									<th style="white-space: normal;"><span id="marketPriceSpan">销售价格</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'count'}">
									<th style="white-space: normal;"><span id="countSpan">数量</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'brandReplace'}">
									<th style="white-space: normal;"><span id="brandReplaceSpan">品牌替代说明</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'abnormalProblem'}">
									<th style="white-space: normal;"><span id="abnormalProblemSpan">异常问题</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'executor'}">
									<th style="white-space: normal;"><span id="executorSpan">对应负责人</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'enquiryDate'}">
									<th style="white-space: normal;"><span id="enquiryDateSpan">询价日期</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'deliveryAddress'}">
									<th style="white-space: normal;"><span id="deliveryAddressSpan">送货地点</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'deliveryDate'}">
									<th style="white-space: normal;"><span id="deliveryDateSpan">送货日期</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'paymentDate'}">
									<th style="white-space: normal;"><span id="paymentDateSpan">付款日期</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'arriveDate'}">
									<th style="white-space: normal;"><span id="arriveDateSpan">到货日期</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'expirationDate'}">
									<th style="white-space: normal;"><span id="expirationDateSpan">保质期</span></th>
								</c:when>
							</c:choose>
							<c:choose>
								<c:when test="${column.className == 'remarks'}">
									<th style="white-space: normal;"><span id="remarksSpan">备注</span></th>
								</c:when>
							</c:choose>
						</c:forEach>
						<shiro:hasPermission name="pro:realDetail:edit">
							<th style="white-space: normal;">操作</th>
						</shiro:hasPermission>
					</tr>
				</thead>
				<tbody id="productInfoTbody">
					<c:forEach items="${list}" var="info">
						 <tr>
							<c:forEach items="${columnList}" var="column">
								<c:choose>
									<c:when test="${column.className == 'productInfoName'}">
										<td style="white-space: normal;">
										<input type="hidden" name=realDetailId value="${info.id}"><span class="productInfoNameSpan">${info.name }</span>
										<input type="hidden" name="name" value="${info.name}"/>
										<input type="hidden" name="productCodeNum" value="${info.productCodeNum}" />
										<span style="display:none" class="productCodeNumSpan">${info.productCodeNum}</span></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'productInfoProductCode'}">
										<td style="white-space: normal;"><span class="productCodeSpan">${info.productCode}</span>
										<input type="hidden" name="productCode" value="${info.productCode}"/></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'productInfoSpecifications'}">
										<td style="white-space: normal;"><span class="specificationsSpan">${info.specifications}</span>
										<input type="hidden" name="specifications" value="${info.specifications}"/></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'productInfoBrand'}">
										<td style="white-space: normal;"><span class="brandSpan">${info.brand}</span>
										<input type="hidden" name="brand" value="${info.brand}"/></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'productInfoPackaging'}">
										<td style="white-space: normal;"><span class="packagingSpan">${info.packaging}</span>
										<input type="hidden" name="packaging" value="${info.packaging}"/></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'unitName'}">
										<td style="white-space: normal;"><span class="unitNameSpan">${info.unit}</span>
										<input type="hidden" name="unit" value="${info.unit}"/></td>
									</c:when>
								</c:choose> 
								<c:choose>
									<c:when test="${column.className == 'supplierName'}">
										<td style="white-space: normal;"><span class="supplierNameSpan">${info.supplier}</span>
										<input type="hidden" name="supplier" value="${info.supplier}"/>
										<input type="hidden" name="supplierCodeNum" value="${info.supplierCodeNum}"/>
										<span style="display:none" class="supplierCodeNumSpan">${info.supplierCodeNum}</span></td>
									</c:when>
								</c:choose> 
								<c:choose>
									<c:when test="${column.className == 'noTaxPrice'}">
										<td style="white-space: normal;"><span class="noTaxPriceSpan">${info.noTaxPrice}</span>
										<input type="hidden" name="noTaxPrice" value="${info.noTaxPrice}"/></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'taxPrice'}">
										<td style="white-space: normal;"><span class="taxPriceSpan">${info.taxPrice}</span>
										<input type="hidden" name="taxPrice" value="${info.taxPrice}"/></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'marketPrice'}">
										<td style="white-space: normal;"><span class="marketPriceSpan">${info.marketPrice}</span>
										<input type="hidden" name="marketPrice" value="${info.marketPrice}"/></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'count'}">
										<td style="white-space: normal;"><span class="countSpan">${info.count}</span>
										<input type="hidden" name="count" value="${info.count}"/></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'brandReplace'}">
										<td style="white-space: normal;"><span class="brandReplaceSpan">${info.brandReplace}</span>
										<input type="hidden" name="brandReplace" value="${info.brandReplace}"/></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'abnormalProblem'}">
										<td style="white-space: normal;"><span class="abnormalProblemSpan">${info.abnormalProblem}</span>
										<input type="hidden" name="abnormalProblem" value="${info.abnormalProblem}"/></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'executor'}">
										<td style="white-space: normal;"><span class="executorSpan">${info.executor}</span>
										<input type="hidden" name="executor" value="${info.executor}" /></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'enquiryDate'}">
										<td style="white-space: normal;"><span class="enquiryDateSpan"><fmt:formatDate value="${info.enquiryDate}" pattern="yyyy-MM-dd" /></span>
										<input type="hidden" name="enquiryDate" value="<fmt:formatDate value="${info.enquiryDate}" pattern="yyyy-MM-dd" />"/></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'deliveryAddress'}">
										<td style="white-space: normal;"><span class="deliveryAddressSpan">${info.deliveryAddress}</span>
										<input type="hidden" name="deliveryAddress" value="${info.deliveryAddress}" /></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'deliveryDate'}">
										<td style="white-space: normal;"><span class="deliveryDateSpan"><fmt:formatDate value="${info.deliveryDate}" pattern="yyyy-MM-dd" /></span>
										<input type="hidden" name="deliveryDatea" value="<fmt:formatDate value="${info.deliveryDate}" pattern="yyyy-MM-dd" />" /></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'paymentDate'}">
										<td style="white-space: normal;"><span class="paymentDateSpan"><fmt:formatDate value="${info.paymentDate}" pattern="yyyy-MM-dd" /></span>
										<input type="hidden" name="paymentDate" value="<fmt:formatDate value="${info.paymentDate}" pattern="yyyy-MM-dd" />" /></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'arriveDate'}">
										<td style="white-space: normal;"><span class="arriveDateSpan"><fmt:formatDate value="${info.arriveDate}" pattern="yyyy-MM-dd" /></span>
										<input type="hidden" name="arriveDate" value="<fmt:formatDate value="${info.arriveDate}" pattern="yyyy-MM-dd" />"/></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'expirationDate'}">
										<td style="white-space: normal;"><span class="expirationDateSpan">${info.expirationDate}</span>
										<input type="hidden" name="expirationDate" value="${info.expirationDate}" /></td>
									</c:when>
								</c:choose>
								<c:choose>
									<c:when test="${column.className == 'remarks'}">
										<td style="white-space: normal;"><span class="remarksSpan">${info.remarks}</span>
										<input type="hidden" name="realDetailRemarks" value="${info.remarks}"/></td>
									</c:when>
								</c:choose>
							</c:forEach>
							<td style="white-space: normal;"><a href="javascript:" onclick="ejectModifyRealDetail(this)"><i class="icon-edit"></i></a>&nbsp; 
								   <a href="javascript:" class="deleteRow"><i class="icon-remove"></i></a></td>
						</tr> 
					</c:forEach>
				</tbody>
			</table>
			<div class="form-actions formBtn">
				<button type="button" class="btn btn-primary" onclick="addPro()">
					<i class="icon-plus"></i>&nbsp;添加产品
				</button>
			</div>
			<div class="">
				<label class="control-label"
					style="font-size: 14px; margin-bottom: 3px;">备注</label>
				<div>
					<textarea rows="5" name="remarks" class="input-xxlarge" id="realContractRemarks">${realContract.remarks }</textarea>
				</div>
			</div>
			<div class="form-actions formBtn">
				<button type="button" class="btn btn-primary" onclick="save()">
					<i class="icon-ok"></i>&nbsp;保存 </button>
				<button type="button" class="btn btn-primary" onclick="history.go(-1)">返 回</button>
			</div>
		</div>
		<!-- 删除的ID数组 -->
		<input type="hidden" name="ids">
		<!-- 合同产品信息 JSON -->
		<input type="hidden" name="realDetail" >
		</form>
	</div>
</div>

<!-- JBox的HTML -->

<!--导入 - JBox  -->
<div id="importBox" class="hide">
	<form id="importForm" action="${ctx}/pro/realDetail/import?realContract.id=${realContract.id}"
		method="post" enctype="multipart/form-data" class="form-search"
		style="padding-left: 20px; text-align: center;">
		<br /> <input id="uploadFile" name="file" type="file"
			style="width: 330px" /><br /> <br /> <input id="btnImportSubmit"
			class="btn btn-primary" type="submit" value="   导    入   " /> <a
			href="${ctx}/pro/realDetail/import/template">下载模板</a>
	</form>
</div>

<!-- 添加产品 - JBox -->
<div id="divPro" class="hide" style="overflow:auto;">
	<div style="padding-top:10px;">
	<c:forEach items="${columnList}" var="column">
		<c:choose>
			<c:when test="${column.className == 'productInfoProductCode'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">产品代码：</label>
					<input type="text" class="input-xlarge" id="productCode" onchange="emptyProductCodeNumAdd()"/> 
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'productInfoName'}">
				<div id="productFlagAdd">
					<label class="control-label" style="width: 130px; text-align: right;">产品名称：</label>
					<input type="text" class="input-xlarge" id="productName" placeholder="输入信息或双击选择" onchange="emptyProductCodeNumAdd()"/>
					<input type="hidden" id="productId" />
					<input type="hidden" id="productCodeNum">
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'productInfoSpecifications'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">规格：</label>
					<input type="text" class="input-xlarge  " id="specifications" onchange="emptyProductCodeNumAdd()" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'productInfoBrand'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">品牌：</label>
					<input type="text" class="input-xlarge" id="brand" onchange="emptyProductCodeNumAdd()" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'productInfoPackaging'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">封装：</label>
					<input type="text" class="input-xlarge" id="packaging" onchange="emptyProductCodeNumAdd()" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'unitName'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">单位：</label>
					<input type="text" class="input-xlarge" id="unit" onchange="emptyProductCodeNumAdd()" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'supplierName'}">
				<div id="supplierFlagAdd">
					<label class="control-label" style="width: 130px; text-align: right;">供应商：</label>
					<input type="text" class="input-xlarge" id="supplier"  placeholder="输入信息或双击选择" onchange="emptySupplierCodeNumAdd()"/>
					<input type="hidden" id="supplierCodeNum">
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'noTaxPrice'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">未税价格：</label>
					<input type="number" max="999999999" class="input-xlarge" id="noTaxPrice" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'taxPrice'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">含税价格：</label>
					<input type="number" max="999999999" class="input-xlarge" id="taxPrice" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'marketPrice'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">销售价格：</label>
					<input type="number" max="999999999" class="input-xlarge" id="marketPrice" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'count'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">数量：</label>
					<input type="number" max="999999999" class="input-xlarge " id="count" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'brandReplace'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">品牌替代说明：</label>
					<input type="text" class="input-xlarge " id="brandReplace" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'abnormalProblem'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">异常问题：</label>
					<input type="text" class="input-xlarge" id="abnormalProblem" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'executor'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">对应负责人：</label>
					<input type="text" class="input-xlarge" id="executor" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'enquiryDate'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">询价日期：</label>
					<input type="date" id="enquiryDate" class="input-xlarge" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'deliveryAddress'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">送货地址：</label>
					<input type="text" class="input-xlarge" id="deliveryAddress" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'deliveryDate'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">送货日期：</label>
					<input type="date" id="deliveryDate" class="input-xlarge" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'paymentDate'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">付款日期：</label>
					<input type="date" id="paymentDate" class="input-xlarge" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'arriveDate'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">到货日期：</label>
					<input type="date" id="arriveDate" class="input-xlarge" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'expirationDate'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">保质期：</label>
					<input type="text" class="input-xlarge" id="expirationDate" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'remarks'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">备注：</label>
					<textarea class="input-xlarge " rows="5" id="remarks" maxlength="255"></textarea>
				</div>
			</c:when>
		</c:choose>
	</c:forEach>
	</div>
</div>
<!-- 选择产品 - JBox -->
<div id="divProInfo" class="hide">
<div style="padding: 10px;">
	<div>
		<form:form class="breadcrumb form-search">
			<ul class="ul-form">
				<li>
					<label>产品名称：</label>
					<input type="text" id="productInfoName" style="width: 100px;" />
					<label>产品代码：</label>
					<input type="text" id="productInfoCode" style="width: 100px;" />
					<label>类别：</label>
					<input type="text" id="productType" style="width: 100px;" />&nbsp;&nbsp;&nbsp;
					<a class="btn btn-primary" href="javascript:void(0)" onclick="selectProduct(this)">
					<i class="icon-search"></i>&nbsp;搜索</a>
				</li>
			</ul>
		</form:form>
	</div>
	<table class="table tablesorter table-striped table-bordered table-condensed" style="margin-top: 10px;">
		<thead>
			<tr>
				<th style="width: 8px;"></th>
				<th>产品名称</th>
				<th>类型</th>
				<th>产品代码</th>
				<th>产品规格</th>
				<th>品牌</th>
				<th>封装</th>
				<th>单位</th>
				<th>备注</th>
			</tr>
		</thead>
		<tbody id="rowProInfo"></tbody>
	</table>
	<div class="pagination">
		<ul>
			<li id="previousPageLiTwo" class="disabled"><a
				id="previousPageTwo" href="javascript:">&#171;上一页</a></li>
			<li id="nextPageLiTwo"><a id="nextPageTwo" href="javascript:">下一页&#187;</a></li>
			<li class="disabled controls">
				<a>当前&nbsp;
					<span id="pageNoOne"></span> /  
					<span id="pageSizeOne"></span> 条，共
					<span id="countOne"></span> 条
				</a>
			</li>
		</ul>
	</div>
</div>
</div>
<!-- 选择供应商 - JBox -->
<div id="divSupplier" class="hide">
<div style="padding: 10px;">
	<div>
		<form:form class="breadcrumb form-search">
			<ul class="ul-form">
				<li>
					<label>供应商名称：</label>
					<input type="text" id="supplierName" style="width: 100px;" />
					<a class="btn btn-primary" href="javascript:void(0)" onclick="selectSupplier(this)">
					<i class="icon-search"></i>&nbsp;搜索</a>
				</li>
			</ul>
		</form:form>
	</div>
	<table class="table tablesorter table-striped table-bordered table-condensed" style="margin-top: 10px;">
		<thead>
			<tr>
				<th style="width: 8px;"></th>
				<th>供应商名称</th>
				<th>电话</th>
				<th>传真</th>
				<th>邮箱</th>
				<th>网址</th>
				<th>地址</th>
			</tr>
		</thead>
		<tbody id="rowSupplier"></tbody>
	</table>
	<div class="pagination">
		<ul>
			<li id="supplierPreviousPageLi" class="disabled"><a
				id="supplierPreviousPage" href="javascript:">&#171;上一页</a></li>
			<li id="supplierNextPageLi"><a id="supplierNextPage" href="javascript:">下一页&#187;</a></li>
			<li class="disabled controls">
				<a>当前&nbsp;
					<span id="supplierPageNo"></span> /  
					<span id="supplierPageSize"></span> 条，共
					<span id="supplierCount"></span> 条
				</a>
			</li>
		</ul>
	</div>
</div>
</div>
<!-- 选择客户 - JBox -->
<div id="choiceClienteleBox" class="hide" style="overflow: auto;">
	<div style="padding-top: 10px;">
		<div>
			<form:form class="breadcrumb form-search">
				<ul class="ul-form">
					<li><label>客户名称：</label><input type="text" id="clienteleName" />&nbsp;'
						<a class="btn btn-primary" href="javascript:void(0)"
						onclick="selectClientele(this)"><i class="icon-search"></i>&nbsp;搜索</a></li>
				</ul>
			</form:form>
		</div>
		<table
			class="table tablesorter table-striped table-bordered table-condensed"
			style="margin-top: 10px;">
			<thead>
				<tr>
					<th style="width: 8px;"></th>
					<th>客户编号</th>
					<th>客户名称</th>
					<th>电话</th>
					<th>传真</th>
					<th>邮箱</th>
					<th style="display: none;">ID</th>
				</tr>
			</thead>
			<tbody id="clienteleTbody">
			</tbody>
		</table>
		<div class="pagination">
			<ul>
				<li id="clientelePreviousPageLi" class="disabled"><a id="clientelePreviousPage" href="javascript:">&#171;上一页</a></li>
				<li id="clienteleNextPageLi"><a id="clienteleNextPage" href="javascript:">下一页&#187;</a></li>
				<li class="disabled controls">
					<a>当前&nbsp;
						<span id="clientelePageNo"></span> /  
						<span id="clientelePageSize"></span> 条，共
						<span id="clienteleCount"></span> 条
					</a>
				</li>
			</ul>
		</div>
	</div>
</div>

<!-- 修改产品信息 - JBox -->
<div id="divModifyPro" class="hide" style="overflow:auto;">
	<div style="padding-top:10px;">
	<c:forEach items="${columnList}" var="column">
	<c:choose>
			<c:when test="${column.className == 'productInfoProductCode'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">产品代码：</label>
					<input type="text" class="input-xlarge" id="productCodeModify" onchange="emptyProductCodeNum()"/> 
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'productInfoName'}">
				<div id="productFlag">
					<label class="control-label" style="width: 130px; text-align: right;">产品名称：</label>
					<input type="text" class="input-xlarge" id="productNameModify"  onchange="emptyProductCodeNum()"/>
					<input type="hidden" class="input-xlarge" id="productCodeNumModify"  />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'productInfoSpecifications'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">规格：</label>
					<input type="text" class="input-xlarge  " id="specificationsModify" onchange="emptyProductCodeNum()" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'productInfoBrand'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">品牌：</label>
					<input type="text" class="input-xlarge" id="brandModify" onchange="emptyProductCodeNum()" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'productInfoPackaging'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">封装：</label>
					<input type="text" class="input-xlarge" id="packagingModify" onchange="emptyProductCodeNum()" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'unitName'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">单位：</label>
					<input type="text" class="input-xlarge" id="unitModify" onchange="emptyProductCodeNum()" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'supplierName'}">
				<div id="supplierFlag">
					<label class="control-label" style="width: 130px; text-align: right;">供应商：</label>
					<input type="text" class="input-xlarge" id="supplierModify" onchange="emptySupplierCodeNum()"/>
					<input type="hidden" class="input-xlarge" id="supplierCodeNumModify"  />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'noTaxPrice'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">未税价格：</label>
					<input type="number" max="999999999" class="input-xlarge" id="noTaxPriceModify"/>
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'taxPrice'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">含税价格：</label>
					<input type="number" max="999999999" class="input-xlarge" id="taxPriceModify" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'marketPrice'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">销售价格：</label>
					<input type="number" max="999999999" class="input-xlarge" id="marketPriceModify" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'count'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">数量：</label>
					<input type="number" max="999999999" class="input-xlarge " id="countModify" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'brandReplace'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">品牌替代说明：</label>
					<input type="text" class="input-xlarge " id="brandReplaceModify" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'abnormalProblem'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">异常问题：</label>
					<input type="text" class="input-xlarge" id="abnormalProblemModify" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'executor'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">对应负责人：</label>
					<input type="text" class="input-xlarge" id="executorModify" value=" "/>
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'enquiryDate'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">询价日期：</label>
					<input type="date" id="enquiryDateModify" class="input-xlarge" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'deliveryAddress'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">送货地址：</label>
					<input type="text" class="input-xlarge" id="deliveryAddressModify" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'deliveryDate'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">送货日期：</label>
					<input type="date" id="deliveryDateModify" class="input-xlarge" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'paymentDate'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">付款日期：</label>
					<input type="date" id="paymentDateModify" class="input-xlarge" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'arriveDate'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">到货日期：</label>
					<input type="date" id="arriveDateModify" class="input-xlarge" />
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'expirationDate'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">保质期：</label>
					<input type="text" class="input-xlarge" id="expirationDateModify"/>
				</div>
			</c:when>
		</c:choose>
		<c:choose>
			<c:when test="${column.className == 'remarks'}">
				<div>
					<label class="control-label" style="width: 130px; text-align: right;">备注：</label>
					<textarea class="input-xlarge " rows="5" id="remarksModify" maxlength="255"></textarea>
				</div>
			</c:when>
		</c:choose>
	</c:forEach>
	</div>
</div>
</body>
</html>

